package com.cropdoctor.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.cropdoctor.model.po.CourseInfoPo;
import com.cropdoctor.model.po.PublishCoursePo;
import com.cropdoctor.model.vo.PublishCourseInfoVO;
import com.cropdoctor.model.vo.PublishCourseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PublishCourseMapper extends BaseMapper<PublishCoursePo> {
    List<PublishCourseVO> selectPublishCourseListWithUrl(@Param(Constants.WRAPPER) Wrapper<PublishCoursePo> queryWrapper);

    PublishCourseInfoVO getCourseInfo(@Param("id") long id);

    List<PublishCourseVO> getPublishCourseList(@Param("id") long userId);

    PublishCourseInfoVO selectWithUserAndVideo(@Param("id") long idCourse);

    CourseInfoPo getSingleCourseInfo(@Param("id") long courseId);
}
